<!DOCTYPE html>
<title>Video elements without controls should not absborb click events</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video></video>
<script>
test(_ => {
  assert_true('eventSender' in window);
}, 'eventSender required');

async_test(t => {
  var video = document.querySelector('video');
  video.addEventListener('loadedmetadata', t.step_func(_ => {
    var rect = video.getBoundingClientRect();
    eventSender.gestureTap(rect.left + rect.width / 2,
                           rect.top + rect.height / 2);
  }));

  addEventListener('click', t.step_func(_ => {
    assert_true(true, 'Received click');
    t.done();
  }));

  video.src = 'content/test.ogv';
});
</script>
